package com.ymatou.iapi.godmch.testcase;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.ymatou.iapi.dguser.parameter.UserCreateBean;
import com.ymatou.iapi.godmch.parameter.CreateCodeBean;
import com.ymatou.iapi.godmch.parameter.bindmchBean;
import com.ymatou.iapi.godmch.parameter.createmchBean;
import com.ymatou.iapi.godmch.parameter.getPromotionWhiteListBean;
import com.ymatou.iapi.godmch.service.CreateCodeCall;
import com.ymatou.iapi.godmch.service.getPromotionWhiteListCall;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.*;
import com.ymt.utils.tag.*;
import com.ymttest.business.service.DGUserCallService;
import com.ymttest.business.service.shenqi.GodmchManageCallService;
/**
*查询售后信息
*FreeMaker Template自动生成代码
*/
@TestSuite
public class Ts_getPromotionWhiteList{
	private static getPromotionWhiteListBean getpromotionwhitelistBean;
	private static getPromotionWhiteListCall call;
	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("查询售后信息");
	}

	@Before
	public void caseUp() {
		getpromotionwhitelistBean=new getPromotionWhiteListBean();
		call=new getPromotionWhiteListCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(call.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_getPromotionWhiteList_001() {
		Logger.start(true,"正例-获取促销活动白名单，目前disconfig删除了白名单");
		try {
			
			call.setData(getpromotionwhitelistBean);
			call.callService();
			
			Logger.verifyEquals("200", call.getStatusCode1(), "验证status");
			//Logger.verifyEquals(true, call.getWhiteList().length()>0, "验证whiteList 不为空");
//			Logger.verifyEquals(500146002, call.getWhiteList().get(0), "验证whiteList第一个白名单");
//			Logger.verifyEquals(500214964, call.getWhiteList().get(1), "验证whiteList第二个白名单");
//			Logger.verifyEquals(500221900, call.getWhiteList().get(2), "验证whiteList第三个白名单");
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}